import requests
import json
from pyquery import PyQuery as jq
url = "https://weixin.sogou.com/weixin?type=1&s_from=input&query=葫芦娃&ie=utf8&_sug_=n&_sug_type_="
data = ""
headers = json.loads(r'''{
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
    "Accept-Encoding": "gzip, deflate, br",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Connection": "keep-alive",
    "Cookie": "IPLOC=CN3301; SUID=2AA0DC733F18960A000000005C189176; SUID=2AA0DC732C12960A000000005C189176; weixinIndexVisited=1; SUV=005F1DC273C6889C5C3D6656B15DE131; ABTEST=0|1551144673|v1; SNUID=DFAEB38CA8AD2A6BABEC721FA9604143; JSESSIONID=aaaoLOXBwL6M7aTK4gSIw; sct=11",
    "Host": "weixin.sogou.com",
    "Referer": "https://weixin.sogou.com/weixin?type=1&s_from=input&query=%E6%88%91%E6%98%AF%E8%B0%81&ie=utf8&_sug_=y&_sug_type_=&w=01019900&sut=6416&sst0=1551144723794&lkt=0%2C0%2C0",
    "Upgrade-Insecure-Requests": "1",
    "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
}''')

resp = requests.get(url, data=data, headers=headers)
for aa in jq(resp.text)('#main > div.news-box > ul > li').items():
	aaa = aa('dl:nth-child(3)').text()
	if '认证' in aaa:
		print(True)
	else:
		print(False)
